Skip to content

Emit nofree attribute#10

Open
hbrooks wants to merge 2 commits into
mainfrom
demo/pr-156281
Open

Emit nofree attribute#10
hbrooks wants to merge 2 commits into
mainfrom
demo/pr-156281

Conversation

@hbrooks
Copy link
Copy Markdown

@hbrooks hbrooks commented May 28, 2026

Originally PR rust-lang#156281 in rust-lang/rust by @nikic

nikic added 2 commits May 7, 2026 17:05
Treat the semantics of pointee.size as "dereferenceable-at-point"
and always specify the size. Instead, use a separate NoFree attribute
to determine whether dereferenceability extends to the whole function.

Then in the LLVM backend, only actually emit dereferenceable if
nofree is also set, as dereferenceable currently implies nofree.

In addition, explicitly emit the nofree attribute, which will help
when LLVM switches dereferenceable to be at-point.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants